{template "header.html"}

<div class="page-wrapper-row full-height">
    <div class="page-wrapper-middle">
        <div class="page-head">
            <div class="container">
                <div class="page-title">
                    <h1>
                    {loop $related $t}
                    <a class="btn btn-default {if $t.id==$tag.id}dark{/if} btn-xs" href="{$t.url}">{$t.name}</a>
                    {/loop}
                   </h1>
                </div>
            </div>
        </div>
        <div class="page-content">

            <div class="container">
                <ul class="page-breadcrumb breadcrumb">
                    <li class="symbol-title">
                        <a href="{SITE_URL}">网站首页</a>
                        <i class="fa fa-circle"></i>
                    </li>
                    {if $parent}
                    <li>
                        <a href="{$parent.url}">{$parent.name}</a>
                        <i class="fa fa-circle"></i>
                    </li>
                    {/if}
                    <li>
                        <span>TAG: {$tag.name}</span>
                    </li>
                </ul>

                {if $tag.id}
                <div class="row">
                    <div class="col-lg-12">
                        <div class="portlet light">
                            <div class="portlet-title">
                                <div class="caption">
                                    <span class="caption-subject font-green">{$tag.name}</span>
                                </div>
                            </div>
                            <div class="portlet-body">
                                {$tag.content}
                            </div>
                        </div>
                    </div>
                </div>
                {/if}

                <div class="row">
                    <!-- 调用全部内容模块,并循环输出相关内容数据 -->
                    {cache name=module-content return=c}
                    <div class="col-md-6">
                        <div class="portlet light">
                            <div class="portlet-title">
                                <div class="caption">
                                    <span class="caption-subject"><a class="font-green" href="{$c.url}">{$tag.name}的{$c.name}</a></span>
                                </div>
                            </div>
                            <div class="portlet-body">
                                <ul class="list-unstyled fc-list-row">
                                    <!-- 调用$c.dirname模块的相关tag内容 显示5条 -->
                                    {related module=$c.dirname field=title,url tag=$tag.tags num=5}
                                    <li><span class="badge badge-empty badge-success"></span> <a href="{$t.url}" class="title">{dr_strcut($t.title, 35)}</a></li>
                                    {/related}
                                </ul>
                            </div>
                        </div>
                    </div>
                    {/cache}
                </div>


            </div>

        </div>
    </div>
</div>

{template "footer.html"}